package com.foreknow.dao;

import com.foreknow.model.Food;

import java.sql.SQLException;
import java.util.List;

public interface FoodDao {
    /**
     * 添加食品信息
     * @return
     * @throws SQLException
     */
    public boolean fSave(Food food) throws SQLException;

    /**
     * 删除
     * @param fid
     * @return
     * @throws SQLException
     */
    public boolean fDelete(int fid) throws SQLException;

    /**
     * 修改
     * @param fid
     * @return
     * @throws SQLException
     */
    public int fUpdate(int fid) throws SQLException;

    /**
     * 查询所有食品信息
     * @param food
     * @return
     * @throws SQLException
     */
    public List<Object> fQueryAll(Food food) throws SQLException;

    /**
     * 根据id查询
     * @param fid
     * @return
     * @throws SQLException
     */
    public boolean fQueryById(int fid) throws SQLException;
}
